import eventBus from "./eventBus"
var mixin = {
    data: function () {
        return {
            showAction: false,
            timeOut: 800
        }
    },
    mounted() {
        setTimeout(() => {
            this.showAction = true
        }, 500)
        eventBus.$on("routetchange", (el) => {
            this.showAction = false;
        });
    },
    methods: {
        beforeEnter: function (el, type) {
            Velocity(el, "slideDown", { delay: 0, duration: this.timeOut, opacity: 1 });
        },
        leave: function (el, type) {
            Velocity(el, "slideUp", { delay: 0, duration: 300, opacity: 0 });
        },
        beforeEnterGroup(el){
            Velocity(el, { delay: 0, duration: 150, scale:"1", easing: "swing" },"ease-in");
        },
        leaveGroup(el){
            Velocity(el, { delay: 0, duration: 150,scale:"1.2", easing: "swing"},'ease-in-out')
        }
    }
}
export default mixin